package com.itheima.Demo;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class Demo对象输出流 {
    public static void main(String[] args) throws IOException {
        //创建对象;
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("Day17codes\\aaa\\123.txt"));

        //创建学生对象
        Student stu = new Student("柳岩",45);
        oos.writeObject(stu);
        oos.close();
    }
}
